package br.usp.ime.controllers;

import br.com.caelum.vraptor.Delete;
import br.com.caelum.vraptor.Get;
import br.com.caelum.vraptor.Post;
import br.com.caelum.vraptor.Put;
import br.com.caelum.vraptor.Resource;
import br.com.caelum.vraptor.Result;
import br.com.caelum.vraptor.Validator;
import br.usp.ime.components.WebUser;
import br.usp.ime.components.daos.EvaluationDao;
import br.usp.ime.entities.Evaluation;

@Resource
public class EvaluationController {

    private final EvaluationDao evaluationDao;
    private final WebUser webUser;
    private final Validator validator;
    private final Result result;

    public EvaluationController(EvaluationDao evaluationDao, WebUser webUser, Validator validator,
            Result result) {
        this.evaluationDao = evaluationDao;
        this.webUser = webUser;
        this.validator = validator;
        this.result = result;
    }

    @Get("/evaluation/new")
    public void newEvaluationForm(Evaluation evaluation) {
    }

    @Post("/evaluation/new")
    public void newEvaluation(Evaluation evaluation) {

    }

    @Put("/evaluation/info")
    public void editEvaluation(Evaluation evaluation) {

    }
    
    @Get("/evaluation/info")
    public void evaluationInfo(Evaluation evaluation) {
        result.include((Evaluation) evaluationDao.loadEvaluation(evaluation));
    }
    
    @Delete("/evaluation/delete")
    public void deleteEvaluation(Evaluation evaluation) {
    }
    
    
}
